# 响应时间中间件
# from main import app
# from fastapi import Request
# import time

# @app.middleware("http")
# async def add_process_time_header(request: Request, call_next):
#     start_time = time.time()
#     response = await call_next(request)
#     process_time = time.time() - start_time
#     response.headers["X_Process-Time"] = str(process_time)
#     return response
